//
//  YJMyAchieveCell.m
//  Sports-Go
//
//  Created by rimi on 16/9/21.
//  Copyright © 2016年 YRL. All rights reserved.
//

#import "YJMyAchieveCell.h"

@implementation YJMyAchieveCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.contentView addSubview:self.headImage];
        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.contentLabel];
        [self.contentView addSubview:self.finishLabel];
    }
    return self;
}

- (void)layoutSubviews{
    self.headImage.frame = RzCGRectMake(20, 15, 50, 50);
    self.titleLabel.frame = RzCGRectMake(90, 15, 90, 20);
    self.contentLabel.frame = RzCGRectMake(90, 40, 120, 20);
    self.finishLabel.frame = RzCGRectMake(280, 15, 70, 50);
  
}
- (void)setFinishText:(NSString *)finishText{
    _finishText = finishText;
    self.finishLabel.text = _finishText;
    if ([_finishText isEqualToString:@"已完成"]) {
    self.finishLabel.textColor = getColor(58, 206, 248, 1);
    }else{
    self.finishLabel.textColor = [UIColor lightGrayColor];
    }
}
#pragma mark -- lazy
- (UIImageView *)headImage{

    if (!_headImage) {
        _headImage = [[UIImageView alloc] init];
        _headImage.layer.cornerRadius = 25 * bi;
        _headImage.layer.masksToBounds = YES;
    }
    return _headImage;
}
- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = getColor(86, 171, 228, 1);
        
    }
    return _titleLabel;
}
- (UILabel *)contentLabel{

    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.font = [UIFont systemFontOfSize:12];
        _contentLabel.textColor = [UIColor lightGrayColor];
    }
    return _contentLabel;
}

- (UILabel *)finishLabel{

    if (!_finishLabel) {
        _finishLabel = [[UILabel alloc] init];
        _finishLabel.textColor = [UIColor lightGrayColor];
    }
    return _finishLabel;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
